<template>
  <el-tabs :value="tabIndex" type="card" @tab-click="tabgo">
    <el-tab-pane label="人员管理" name="1"></el-tab-pane>
    <el-tab-pane label="内设机构" name="0"></el-tab-pane>
  </el-tabs>
</template>

<script>
export default {
  props: {
    tabIndex: {
      type: String,
      default: "0"
    }
  },
  methods: {
    tabgo(val) {
      switch (val.name) {
        case "0":
          this.$router.push({ name: "dept" });
          break;
        case "1":
          this.$router.push({ name: "account" });
          break;
        default:
          break;
      }
    }
  }
};
</script>